<template>
  <!--评估查验的图片预览-->
  <div class="des_image">
    <a v-for="(item,index) in list">
      <div class="list_img" :style="'backgroundImage:url('+item+')'" @click="preview(index)"></div>
    </a>
  </div>
</template>
<style lang="scss">
  .des_image {
    .list_img {
      width: 100%;
      height: 200px;
      border-radius: 5px;
      margin-top: 10px;
      background-size: cover;
      background-position: center;
      border: 1px solid #f2f2f2;
    }
  }
</style>
<script>
  import wx from 'weixin-js-sdk'

  export default {
    data () {
      return {}
    },
    props: ['list'],
    created () {
      // console.log(this.list)
    },
    methods: {
      preview (index) {
        wx.previewImage({
          current: this.list[index], // 当前显示图片的http链接
          urls: this.list // 需要预览的图片http链接列表
        })
      }
    },
    components: {}
  }
</script>
